package com.yx.cloud.bean.tuya;

import java.util.List;

public class RequestSetAppointSweep<T> {

    /**
     * timeZone : 8
     * value : [{"startTime":0,"endTime":3600,"active":true,"unlock":true,"period":[1,2,3,4,5],"cleanAreas":[]},{"startTime":7200,"endTime":10800,"active":false,"unlock":false,"period":[],"cleanAreas":[]}]
     */

    private int timeZone;
    private T value;

    private RequestSetAppointSweep(Builder<T> builder) {
        setTimeZone(builder.timeZone);
        setValue(builder.value);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public int getTimeZone() {
        return timeZone;
    }

    public void setTimeZone(int timeZone) {
        this.timeZone = timeZone;
    }

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }

    public static class ValueBean {
        /**
         * startTime : 0
         * endTime : 3600
         * active : true
         * unlock : true
         * period : [1,2,3,4,5]
         * cleanAreas : []
         */

        private int startTime;
        private int endTime;
        private boolean active;
        private boolean unlock;
        private List<Integer> period;
        private List<?> cleanAreas;

        public int getStartTime() {
            return startTime;
        }

        public void setStartTime(int startTime) {
            this.startTime = startTime;
        }

        public int getEndTime() {
            return endTime;
        }

        public void setEndTime(int endTime) {
            this.endTime = endTime;
        }

        public boolean isActive() {
            return active;
        }

        public void setActive(boolean active) {
            this.active = active;
        }

        public boolean isUnlock() {
            return unlock;
        }

        public void setUnlock(boolean unlock) {
            this.unlock = unlock;
        }

        public List<Integer> getPeriod() {
            return period;
        }

        public void setPeriod(List<Integer> period) {
            this.period = period;
        }

        public List<?> getCleanAreas() {
            return cleanAreas;
        }

        public void setCleanAreas(List<?> cleanAreas) {
            this.cleanAreas = cleanAreas;
        }
    }


    public static final class Builder<T> {
        private int timeZone;
        private T value;

        private Builder() {
        }

        public Builder setTimeZone(int timeZone) {
            this.timeZone = timeZone;
            return this;
        }

        public Builder setValue(T value) {
            this.value = value;
            return this;
        }

        public RequestSetAppointSweep build() {
            return new RequestSetAppointSweep(this);
        }
    }
}
